/*
 * $Id: TarTransFileTyper.java,v 1.2 2009/07/24 18:28:04 oliver Exp $
 *
 * Copyright (C) 2006 General Electric Company. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 *
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */

/*
 ** Authored by Timothy Gerard Endres
 ** <mailto:time@ice.com>  <http://www.ice.com>
 ** 
 ** This work has been placed into the public domain.
 ** You may use this work in any way and for any purpose you wish.
 **
 ** THIS SOFTWARE IS PROVIDED AS-IS WITHOUT WARRANTY OF ANY KIND,
 ** NOT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY. THE AUTHOR
 ** OF THIS SOFTWARE, ASSUMES _NO_ RESPONSIBILITY FOR ANY
 ** CONSEQUENCE RESULTING FROM THE USE, MODIFICATION, OR
 ** REDISTRIBUTION OF THIS SOFTWARE. 
 ** 
 */

package com.ge.healthcare.autosc.common.util.tar;

import java.io.File;

/**
 * This interface indicates if a file qualifies for ASCII translation. To
 * support customization of TAR translation, this interface allows the
 * programmer to provide an object that will check files that do not match the
 * MIME types file's check for 'text/*' types. To provide your own typer,
 * subclass this class and set the TarArchive's TransFileTyper via the method
 * setTransFileTyper().
 */

public class TarTransFileTyper {
	/**
	 * Return true if the file should be translated as ASCII.
	 * 
	 * @param f
	 *            The file to be checked to see if it need ASCII translation.
	 */

	public boolean isAsciiFile(File f) {
		return false;
	}

	/**
	 * Return true if the file should be translated as ASCII based on its name.
	 * The file DOES NOT EXIST. This is called during extract, so all we know is
	 * the file name.
	 * 
	 * @param name
	 *            The name of the file to be checked to see if it need ASCII
	 *            translation.
	 */

	public boolean isAsciiFile(String name) {
		return false;
	}

}
